<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
%>
<style>
.psearch p { float:left; display:block; width:260px; height:21px; margin:0; padding:5px 0; position:relative;}
.psearch p.nowrap { height:auto; width: 100%}
.psearch label { float:left; width:80px; padding:0 5px; line-height:21px;}
.pbutton { height:25px;}
.pbutton ul { float:right;}
.pbutton li { float:left; margin-left:5px;}
</style>
<!--考勤记录页面  -->
<link href="${pageContext.request.contextPath}/style/stulist.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript">

</script>
	<div class="pageHeader" >
		<form id="rpcard_count" onsubmit="return navTabSearch(this);" action="replaceCardCountUi.action"
			method="post">
			<div class="psearch nowrap">
			<p style="width: 255px;">
				<label>学校名称:</label>
					<input type="text" name="model.sclName" value="${sclName}" maxlength="20" 
						postField="sclName" 
						suggestFields="sclName" 
						suggestUrl="school_suggest.action" 
						lookupGroup="model"/>
					<a style="float: right;" class="btnLook" href="school_lookup.action?numPerPage=10" lookupGroup="model">查找学校</a>
			</p>
			<p>
				<label>学校编号：</label>
				<input type="text" name="sclNumber" value="${sclNumber }" maxlength="5">
			</p>
			<p>
				<label>所属地区：</label>
				<select
					name="areaCode" 
					class="combox" id="list_areaCode" ref="area_county" refUrl="school_getAreaByCity.action?areaCode={value}">
					<option value="">---所有地区---</option>
					<c:forEach items="${application.areaList}" var="area">
						<option ${areaCode==area.areaCode?"selected":""}  value="${area.areaCode }">${area.areaName}</option>
					</c:forEach>
				</select>
			</p>
			<p>
				<label>所属县区：</label>
				<select
					name="countyCode" 
					class="combox" id="area_county">
					<option value="">---所有县区---</option>
					<c:forEach items="${countyList}" var="area">
						<option ${countyCode==area.areaCode?"selected":""}  value="${area.areaCode }">${area.areaName}</option>
					</c:forEach>
				</select>
			</p>
			<p><label>开始日期：</label>
					<c:choose>
						<c:when test="${empty startDate }">
						<input type="text" name="startDate"
							id="startDate" value="" class="date"
							dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" /></c:when>
							<c:otherwise><input type="text" name="startDate"
							id="startDate" value="${startDate }" class="date"
							dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" /></c:otherwise></c:choose>
					<%-- <input type="text" name="startDate" id="startDate" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" value="${startDate }"/> --%>
				</p>
				<p><label>结束日期：</label>
				<c:choose>
						<c:when test="${empty endDate }">
						<input type="text" name="endDate"
							id="endDate" value="" class="date"
							dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" /></c:when>
							<c:otherwise><input type="text" name="endDate"
							id="endDate" value="${endDate }" class="date"
							dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" /></c:otherwise></c:choose>
					<%-- <input type="text" name="endDate" id="endDate" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" value="${endDate }"/></td>
					<input type="hidden" name="load" id="load" value=""/> --%>
				</p>
				</div>
				<div class="ptbutton">
				    <ul>
					<li style="display: none;"><div class="buttonActive">
							<div class="buttonContent">
								<button id="rpcount_count_btn" type="submit">统计</button>
							</div>
						</div></li>
					<li><a class="button" href="javascript:void(0)"
						onclick="rpcardCount()"><span>统计</span></a></li>
				</ul>
				</div>
				

		</form>
		</div>
		
<div class="tabs" >
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li><a href="javascript:;"><span>统计列表</span></a></li>
					<!-- 
					<li><a href="javascript:;"><span>统计图表</span></a></li>
					 -->
				</ul>
			</div>
		</div>
		<div class="tabsContent" >
			<div>
				<div id="orderList_count_jbsxBox"  style="float:left; display:block; overflow:auto; width:100%; border:solid 1px #CCC; line-height:21px; background:#fff">
				<table class="table"  width="100%" border="1" layoutH="188">
				<thead>
					<tr>
						<th  >序号</th>
						<th  >学校名称</th>
						<th  >补卡数量</th>
						<th  >费用总额</th>
						<th  >补卡进度</th>
						<th  >申请人</th>
						<th  >付费情况</th>
					</tr>
				</thead>
				<tbody id="listBody">
							<c:forEach items="${orderList}" var="order" varStatus="i" >
								<tr target="ajax" rel="dormAtt_jbsxBox"  >
									<td>${i.index+1}</td>
									<td>${order.sclName }</td>
									<td>${order.rcoCountNumber }</td>
									<td>${order.rcoAmount}</td>
									<td><c:if test="${order.progStatus eq '4' }">已审核</c:if><c:if test="${order.progStatus eq '5' }">物流信息添加完成</c:if><c:if test="${order.progStatus eq '9' }">完成</c:if></td>
									<td>${order.createOperName }</td>
									<td><c:if test="${order.payStatus eq '0' }">免费</c:if><c:if test="${order.payStatus eq '1' }">未付费</c:if><c:if test="${order.payStatus eq '2' }">已付费</c:if></td>
								</tr>
							</c:forEach>
				</tbody>
			</table>
			<hr/>
			<table class="table"  width="100%" border="1" layoutH="10">
					<tr>
						<td style="color:red">补卡总数</td>
						<td style="color:red">${cardCount }</td>
						<td style="color:red">补卡费用总额</td>
						<td style="color:red">${amount }</td>
						<td style="color:red">补卡总单据数</td>
						<td style="color:red">${orderCount }</td>
					</tr>
					<tr>
						<td style="color:red">收费单据数</td>
						<td style="color:red">${payOrderCount }</td>
						<td style="color:red">免费单据数</td>
						<td style="color:red">${freeOrderCount}</td>
						<td style="color:red">${order.progStatus }</td>
						<td style="color:red">${order.createOperName }</td>
					</tr>
			</table>
			
				</div>
			</div>
			<div>
				<div id="orderChart_count_jbsxBox" style="float:left; display:block; overflow:auto; width:100%; border:solid 1px #CCC; line-height:21px; background:#fff">
						
				</div>
	
			</div>
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
	<script type="text/javascript">
		
		function rpcardCount(){
			$("#rpcard_count", navTab.getCurrentPanel()).attr("action","order_replaceCardCountUi.action");
			$("#rpcard_count", navTab.getCurrentPanel()).attr("onsubmit","return navTabSearch(this);");
			$("#rpcount_count_btn", navTab.getCurrentPanel()).click();
			
		}
		
		
		
	</script>